package com.wing.bill.model.enums;

import lombok.Getter;

@Getter
public enum ShipmentOrderStatusEnum {
    REVOKED("0","已撤销"),
    WAITING_TO_SIGN("1", "待签收"),
    SIGN("2","已签收"),
    WAREHOUSING("3","已入库"),
    ;


    private final String code;
    private final String desc;

    ShipmentOrderStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(String source) {
        for (ShipmentOrderStatusEnum value : ShipmentOrderStatusEnum.values()) {
            if (value.code.equals(source)) {
                return value.desc;
            }
        }
        return null;
    }
}
